package com.threadmethod.getId;

/**
 * @PackageName:com.threadmethod.getId
 * @ClassName:Test05
 * @Description:
 * @Author: zhangxiaoyu
 * @date 2020/11/19 16:57
 */
public class Test05 {
    
    public static void main(String[] args){
         System.out.println(Thread.currentThread().getName()+"id = "+Thread.currentThread().getId());

         //子线程的id
        for (int i=1;i<30;i++){
            SubThreads t5 = new SubThreads();
            t5.start();

            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
